package com.wedu.modules.dss.entity.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("dss_device_information")
@HeadRowHeight(value = 25) // 头部行高
@ContentRowHeight(value = 20) // 内容行高
@ColumnWidth(value = 20) // 列宽
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
public class DssDeviceInformationDTO implements Serializable {
    /**
     * 主键
     */
    @ExcelIgnore
    @TableId
    private Long id;

    /**
     * 车间名称
     */

    @ExcelProperty({ "设备台账表", "车间名称" })
    @TableField(value="workshop_name")
    private String workshopName;
    /**
     * 设备编号
     */
    @ExcelProperty({ "设备台账表", "设备编号" })
    @TableField(value="device_id")
    private String deviceId;

    /**
     * 字典项
     */
    @ExcelProperty({ "设备台账表", "设备类型" })
    private String name;
    /**
     * 设备类型
     */
    @ExcelIgnore
    @TableField(value="device_type")
    private String deviceType;

    /**
     * 设备名称
     */
    @ExcelProperty({ "设备台账表", "设备名称" })
    @TableField(value="device_name")
    private String deviceName;

    /**
     * 设备型号
     */
    @ExcelProperty({ "设备台账表", "设备型号" })
    @TableField(value="device_model")
    private String deviceModel;

    /**
     * 制造厂
     */
    @ExcelProperty({ "设备台账表", "制造厂" })
    private String factory;

    /**
     * 生产日期
     */
    @ExcelProperty({ "设备台账表", "生产日期" })
    @DateTimeFormat("yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd ")
    private Date produceTime;

    /**
     * 使用开始日期
     */
    @ExcelProperty({ "设备台账表", "使用开始日期" })
    @DateTimeFormat("yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd ")
    private Date startUseTime;

    /**
     * 维保日期
     */
    @ExcelProperty({ "设备台账表", "维保日期" })
    @DateTimeFormat("yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd ")
    private Date maintenanceTime;
    /**
     * 传感器ID
     */
    @ExcelProperty({ "设备台账表", "传感器ID" })
    @TableField(value="sensor_id")
    private String  sensorId;
    /**
     * 备注
     */
    @ExcelProperty({ "设备台账表", "备注" })
    private String notes;

    /**
     * 视频
     */
    @ExcelIgnore
    private String video;
    @ExcelIgnore
    @ExcelProperty({ "设备台账表", "保养计划" })
    @TableField("maintenance_plan")
    private String maintenancePlan;
    @ExcelIgnore
    @ExcelProperty({ "设备台账表", "保养到期时间" })
    @TableField("maintenance_due_time")
    private Date maintenanceDueTime;
    @ExcelIgnore
    @ExcelProperty({ "设备台账表", "预警时间" })
    @TableField("notice_time")
    private Date noticeTime;
    @ExcelIgnore
    @TableField("maintenance_status")
    private Integer maintenanceStatus;
    @ExcelIgnore
    @ExcelProperty({ "设备台账表", "保养周期" })
    @TableField("maintenance_cycle")
    private Integer maintenanceCycle;
    @ExcelIgnore
    @ExcelProperty({ "设备台账表", "提前时间" })
    @TableField("advance_time")
    private Integer advanceTime;

    /**
     * 逻辑删除
     */
    @ExcelIgnore
    @TableField(value="is_deleted")
    @TableLogic
    private Byte isDeleted;

    /**
     * 创建人ID
     */
    @ExcelIgnore
    @TableField(value="create_by")
    private Long createBy;
    /**
     * 用户真实姓名
     */
    @ExcelProperty({ "设备台账表", "创建人" })
    @TableField(value="real_name")
    private String realName;
    /**
     * 创建时间
     */

    @ExcelProperty({ "设备台账表", "创建时间" })
    @TableField(fill = FieldFill.INSERT,value = "create_time")
    private Date createTime;

    /**
     * 修改人ID
     */

    @ExcelIgnore
    @TableField(value="update_by")
    private Long updateBy;

    /**
     * 修改时间
     */

   @ExcelIgnore
    @TableField(fill = FieldFill.UPDATE,value = "update_time")
    private Date updateTime;

    /**
     *  设备状态
     */
    @ExcelIgnore
    @TableField(value="light_status")
    private Integer lightStatus;

    /**
     * 用户id(用来获取用户名)
     */
    @ExcelIgnore
    @TableField(value="user_id")
    private Long userId;

    @ExcelIgnore
    private Long followId;
    private static final long serialVersionUID = 1L;


}